******REPLICATION MATERIALS FOR TABLES C1-C4*********************


********************************************************************************
*                                                                              *
*                 Politicians' Survey baseline dataset                         *
*                                                                              *
********************************************************************************
clear
cap cd "/GhanaPaper_Governance/ReplicationFiles" 

use "./Data/pol_baseline_AuditsPaper.dta"

* First: Analysis of List Experiment 3: Party Favoritism

********************************************************************************
*                        T-tests per treatment condition                       *
********************************************************************************
* T-tests per treatment condition
sort condition 

by condition: ttest surveyexp3, by(list_3)

reg surveyexp3 i.trt##i.list_3, r

*ritest trt _b[trt],reps(2000) seed(123) cluster(district_n) strata(triplet): ologit construct_problems trt i.triplet, r


********************************************************************************
*     T-tests per treatment condition for  districts with high/low scores      *
********************************************************************************

tab trt condition 

sort trt 
by trt: ttest surveyexp3 if audit_score==0, by(list_3)

by trt: ttest surveyexp3 if audit_score==1, by(list_3)


********************************************************************************
*     T-tests per treatment condition for  districts with NDC majority         *
********************************************************************************

tab trt condition 

sort trt 
* NDC minority
by trt: ttest surveyexp3 if ndc_majority==0, by(list_3)

* NDC Majority:
by trt: ttest surveyexp3 if ndc_majority==1, by(list_3)


********************************************************************************
* T-tests per treatment condition for districts according to competition levels*
********************************************************************************

tab trt condition 

sort trt 
* Highly competitive district
by trt: ttest surveyexp3 if hcomp==1, by(list_3)

* Non competitive district 
by trt: ttest surveyexp3 if hcomp==0, by(list_3)

********************************************************************************
********************************************************************************
*                                                                              *
*                 Politicians' Survey Midline dataset                          *
*                                                                              *
********************************************************************************
clear
use "./Data/pol_midline_AuditsPaper.dta"

* First: Analysis of List Experiment 3 

********************************************************************************
*                        T-tests per treatment condition                       *
********************************************************************************
* T-tests per treatment condition
sort condition 

by condition: ttest surveyexp3, by(list_3)

********************************************************************************
*     T-tests per treatment condition for  districts with high/low scores      *
********************************************************************************

tab trt condition 

sort trt 
by trt: ttest surveyexp3 if audit_score==0, by(list_3)

by trt: ttest surveyexp3 if audit_score==1, by(list_3)


********************************************************************************
*     T-tests per treatment condition for  districts with NDC majority         *
********************************************************************************

tab trt condition 

sort trt 
* NDC minority
by trt: ttest surveyexp3 if ndc_majority==0, by(list_3)

* NDC Majority:
by trt: ttest surveyexp3 if ndc_majority==1, by(list_3)


********************************************************************************
* T-tests per treatment condition for districts according to competition levels*
********************************************************************************

tab trt condition 

sort trt 
* Highly competitive district
by trt: ttest surveyexp3 if hcomp==1, by(list_3)

* Non competitive district 
by trt: ttest surveyexp3 if hcomp==0, by(list_3)

********************************************************************************

********************************************************************************
*                                                                              *
*                 Politicians' Survey Endline dataset                          *
*                                                                              *
********************************************************************************
use "./Data/pol_endline_AuditsPaper.dta", clear

* First: Analysis of List Experiment 3: Party Favoritism

********************************************************************************
*                        T-tests per treatment condition                       *
********************************************************************************
* T-tests per treatment condition
sort condition
by condition: ttest surveyexp3, by(list_3)

********************************************************************************
*     T-tests per treatment condition for  districts with high/low scores      *
********************************************************************************

tab trt condition

sort trt
by trt: ttest surveyexp3 if audit_score==0, by(list_3)

by trt: ttest surveyexp3 if audit_score==1, by(list_3)

********************************************************************************
*     T-tests per treatment condition for  districts with NDC majority         *
********************************************************************************

tab trt condition 

sort trt 
* NDC minority
by trt: ttest surveyexp3 if ndc_majority==0, by(list_3)

* NDC Majority:
by trt: ttest surveyexp3 if ndc_majority==1, by(list_3)

********************************************************************************
* T-tests per treatment condition for districts according to competition levels*
********************************************************************************

tab trt condition 

sort trt 
* Highly competitive district
by trt: ttest surveyexp3 if hcomp==1, by(list_3)

* Non competitive district 
by trt: ttest surveyexp3 if hcomp==0, by(list_3)

********************************************************************************
